<div class="col-auto">
  <label class='control-label'>Output</label>
  <div>
    <select class="form-control form-tooltip form-dropdown" id="unique_id_1" name="unique_id_1" data-placement="top" title="{{_('Trigger this conditional to act when this output turns on or off')}}">
      <option value="">{{dict_translation['select_one']['title']}}</option>
      {%- for each_output in choices_output_channels if 'on_off' in each_output['types'] -%}
        <option value="{{each_output['value']}}"{% if each_function.unique_id_1 == each_output['value'].split(",")[0] and each_function.unique_id_2 == each_output['value'].split(",")[1] %} selected{% endif %}>{{each_output['item']}}</option>
      {%- endfor -%}
    </select>
  </div>
</div>
<div class="col-auto">
  {{form_trigger.output_state.label(class_='control-label')}}
  <select class="form-control form-tooltip form-dropdown" id="output_state" name="output_state" data-placement="top" title="{{_('What action will trigger this conditional, on or off?')}}">
    <option value="">{{dict_translation['select_one']['title']}}</option>
    <option value="on_duration_none"{% if each_function.output_state == 'on_duration_none' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('no duration')}})</option>
    <option value="on_duration_any"{% if each_function.output_state == 'on_duration_any' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('any duration')}})</option>
    <option value="on_duration_none_any"{% if each_function.output_state == 'on_duration_none_any' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('no or any duration')}})</option>
    <option value="on_duration_equal"{% if each_function.output_state == 'on_duration_equal' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('equal to duration')}})</option>
    <option value="on_duration_greater_than"{% if each_function.output_state == 'on_duration_greater_than' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('greater than duration')}})</option>
    <option value="on_duration_equal_greater_than"{% if each_function.output_state == 'on_duration_equal_greater_than' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('greater than or equal to duration')}})</option>
    <option value="on_duration_less_than"{% if each_function.output_state == 'on_duration_less_than' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('less than duration')}})</option>
    <option value="on_duration_equal_less_than"{% if each_function.output_state == 'on_duration_equal_less_than' %} selected{% endif %}>{{dict_translation['on']['title']}} ({{_('less than or equal to duration')}})</option>
    <option value="off"{% if each_function.output_state == 'off' %} selected{% endif %}>{{dict_translation['off']['title']}}</option>
  </select>
</div>
<div class="col-auto">
  {{form_trigger.output_duration.label(class_='control-label')}}
  <div>
   {{form_trigger.output_duration(class_='form-control', value=each_function.output_duration, **{'title':_('(Optional) Set this to a specific duration of time if the conditional should trigger when the output On duration equals this amount'), 'size':'3'})}}
  </div>
</div>
